package com.example.mybatisplus.typehandler;

import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.example.mybatisplus.enums.TypeName;
import com.example.mybatisplus.mapper.OtherMapper;
import com.example.mybatisplus.pojo.One;
import com.example.mybatisplus.pojo.Other;
import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.MappedJdbcTypes;
import org.apache.ibatis.type.MappedTypes;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


public class TestTypeHandler extends JacksonTypeHandler {


    public TestTypeHandler() {
        super(Other.class);
    }

    /**
     *
     * @param json
     * @return
     */
    @Override
    protected Object parse(String json) {
        System.out.println(TypeName.getTypeName(json));
        System.out.println(json);
        return TypeName.getTypeName(json);
    }
}
